# def f(x,y):
#     result = 1
#     for i in range(1,y-x):
#         result *= i
#     return result
if __name__ == '__main__':
    # x=list(map(lambda x,y:(x,y), (0,2,4),range(5,8) ))
    # print(x)

    for n in range(100, 1, -1):
        for i in range(2, n):
            if n % i == 0:
                break
        else:
            print(n, end=' ')

    for n in range(100, 1, -10):
        print(n)